namespace NHCodeFirst.Enums
{
    internal class EnumsToHbmString
    {
        public static string GetGenerator(IdGenerator idGenerator)
        {
            switch (idGenerator)
            {
                case IdGenerator.Assigned:
                    return "assigned";
                case IdGenerator.Counter:
                    return "clounter";
                case IdGenerator.Foreign:
                    return "foreign";
                case IdGenerator.Guid:
                    return "guid";
                case IdGenerator.GuidComb:
                    return "guid.combo";
                case IdGenerator.HiLo:
                    return "hilo";
                case IdGenerator.Increment:
                    return "increment";
                case IdGenerator.Native:
                    return "native";
                case IdGenerator.Sequence:
                    return "sequence";
                case IdGenerator.SequenceHilo:
                    return "seqhilo";
                case IdGenerator.UuidHex:
                    return "uuid.hex";
                case IdGenerator.UuidString:
                    return "uuid.string";
                default:
                    return null;
            }
        }

        public static string GetClrType(ClrType type)
        {
            switch (type)
            {
                case ClrType.CultureInfo:
                    return "System.Globalization." + type;
                case ClrType.ByteArray:
                    return "System.Byte[]";
                default:
                    return "System." + type;
            }
        }

        public static string GetAccessNamingStrategy(Naming naming)
        {
            switch (naming)
            {
                case Naming.CamelCase:
                    return "camelcase";
                case Naming.CamelCaseUnderScore:
                    return "camelcase-underscore";
                case Naming.LowerCase:
                    return "lowercase";
                case Naming.LowerCaseUnderScore:
                    return "lowercase-underscore";
                case Naming.PascalCaseM:
                    return "pascalcase-m";
                case Naming.PascalCaseMUnderScore:
                    return "pascalcase-m-underscore";
                case Naming.PascalCaseUnderScore:
                    return "pascalcase-underscore";
                default:
                    return null;
            }
        }
    }
}